package cz.muni.fi.pa165.carpark.dao;

import cz.muni.fi.pa165.carpark.entities.BusinessTrip;
import cz.muni.fi.pa165.carpark.entities.Employee;
import cz.muni.fi.pa165.carpark.entities.Vehicle;
import java.util.List;

/**
 * 
 * BusinessTripDAO
 *
 * @author Adrian
 */
public interface BusinessTripDAO {
    
    /**
     * Creates a new BusinessTrip entity
     * 
     * @param businessTrip BusinessTrip to create
     * @throw IllegalArgumentException when businessTrip is null
     */
    void create(BusinessTrip businessTrip);

    /**
     * Return BusinessTrip entity with given id.
     * 
     * @param id id of searched BusinessTrip
     * @throws IllegalArgumentException when id is null.or less than zero.
     * 
     */
    BusinessTrip read(Long id);

    /**
     * Updates BusinessTrip entity
     * 
     * @param businessTrip BusinessTrip to update
     * @throws IllegalArgumentException when businessTrip is null.
     * 
     */
    void update(BusinessTrip businessTrip);

    /**
     * Delete BusinessTrip entity
     * 
     * @param businessTrip BusinessTrip to delete
     * @throws IllegalArgumentException when businessTrip is null.
     * 
     */
    void delete(BusinessTrip businessTrip);

    /**
     * Returns all BusinessTrips associated with given employee
     * 
     * @param employee Employee which we want all his businessTrips
     * @throws IllegalArgumentException when employee is null
     */
    List<BusinessTrip> getEmployeeBusinessTrips(Employee employee);

    /**
     * Returns all BusinessTrips associated with given vehicle
     * 
     * @param vehicle Vehicle with which we want all associated BusinessTrips
     * @throws IllegalArgumentException when vehicle is null
     */
    List<BusinessTrip> getVehiclesBusinessTrips(Vehicle vehicle);
    
    /*
     * Returns all BusinessTrips
     */
    List<BusinessTrip> findAll();
}
